Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

a__f(0) → cons(0, f(s(0)))
a__f(s(0)) → a__f(a__p(s(0)))
a__p(s(X)) → mark(X)
mark(f(X)) → a__f(mark(X))
mark(p(X)) → a__p(mark(X))
mark(0) → 0
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(s(X)) → s(mark(X))
a__f(X) → f(X)
a__p(X) → p(X)

Q is empty.


QTRS
  ↳ RRRPoloQTRSProof

Q restricted rewrite system:
The TRS R consists of the following rules:

a__f(0) → cons(0, f(s(0)))
a__f(s(0)) → a__f(a__p(s(0)))
a__p(s(X)) → mark(X)
mark(f(X)) → a__f(mark(X))
mark(p(X)) → a__p(mark(X))
mark(0) → 0
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(s(X)) → s(mark(X))
a__f(X) → f(X)
a__p(X) → p(X)

Q is empty.

The following Q TRS is given: Q restricted rewrite system:
The TRS R consists of the following rules:

a__f(0) → cons(0, f(s(0)))
a__f(s(0)) → a__f(a__p(s(0)))
a__p(s(X)) → mark(X)
mark(f(X)) → a__f(mark(X))
mark(p(X)) → a__p(mark(X))
mark(0) → 0
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(s(X)) → s(mark(X))
a__f(X) → f(X)
a__p(X) → p(X)

Q is empty.
The following rules can be removed by the rule removal processor [15] because they are oriented strictly by a polynomial ordering:

mark(f(X)) → a__f(mark(X))
Used ordering:
Polynomial interpretation [25]:

POL(0) = 0   
POL(a__f(x1)) = 1 + 2·x1   
POL(a__p(x1)) = 2·x1   
POL(cons(x1, x2)) = x1 + x2   
POL(f(x1)) = 1 + 2·x1   
POL(mark(x1)) = 2·x1   
POL(p(x1)) = 2·x1   
POL(s(x1)) = 2·x1   




↳ QTRS
  ↳ RRRPoloQTRSProof
QTRS
      ↳ RRRPoloQTRSProof

Q restricted rewrite system:
The TRS R consists of the following rules:

a__f(0) → cons(0, f(s(0)))
a__f(s(0)) → a__f(a__p(s(0)))
a__p(s(X)) → mark(X)
mark(p(X)) → a__p(mark(X))
mark(0) → 0
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(s(X)) → s(mark(X))
a__f(X) → f(X)
a__p(X) → p(X)

Q is empty.

The following Q TRS is given: Q restricted rewrite system:
The TRS R consists of the following rules:

a__f(0) → cons(0, f(s(0)))
a__f(s(0)) → a__f(a__p(s(0)))
a__p(s(X)) → mark(X)
mark(p(X)) → a__p(mark(X))
mark(0) → 0
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(s(X)) → s(mark(X))
a__f(X) → f(X)
a__p(X) → p(X)

Q is empty.
The following rules can be removed by the rule removal processor [15] because they are oriented strictly by a polynomial ordering:

a__f(X) → f(X)
Used ordering:
Polynomial interpretation [25]:

POL(0) = 0   
POL(a__f(x1)) = 2 + 2·x1   
POL(a__p(x1)) = 2·x1   
POL(cons(x1, x2)) = 1 + 2·x1 + x2   
POL(f(x1)) = 1 + x1   
POL(mark(x1)) = x1   
POL(p(x1)) = 2·x1   
POL(s(x1)) = x1   




↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
QTRS
          ↳ RRRPoloQTRSProof

Q restricted rewrite system:
The TRS R consists of the following rules:

a__f(0) → cons(0, f(s(0)))
a__f(s(0)) → a__f(a__p(s(0)))
a__p(s(X)) → mark(X)
mark(p(X)) → a__p(mark(X))
mark(0) → 0
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(s(X)) → s(mark(X))
a__p(X) → p(X)

Q is empty.

The following Q TRS is given: Q restricted rewrite system:
The TRS R consists of the following rules:

a__f(0) → cons(0, f(s(0)))
a__f(s(0)) → a__f(a__p(s(0)))
a__p(s(X)) → mark(X)
mark(p(X)) → a__p(mark(X))
mark(0) → 0
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(s(X)) → s(mark(X))
a__p(X) → p(X)

Q is empty.
The following rules can be removed by the rule removal processor [15] because they are oriented strictly by a polynomial ordering:

a__f(0) → cons(0, f(s(0)))
Used ordering:
Polynomial interpretation [25]:

POL(0) = 0   
POL(a__f(x1)) = 2 + 2·x1   
POL(a__p(x1)) = 2·x1   
POL(cons(x1, x2)) = x1 + x2   
POL(f(x1)) = 1 + x1   
POL(mark(x1)) = 2·x1   
POL(p(x1)) = 2·x1   
POL(s(x1)) = 2·x1   




↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
QTRS
              ↳ RRRPoloQTRSProof

Q restricted rewrite system:
The TRS R consists of the following rules:

a__f(s(0)) → a__f(a__p(s(0)))
a__p(s(X)) → mark(X)
mark(p(X)) → a__p(mark(X))
mark(0) → 0
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(s(X)) → s(mark(X))
a__p(X) → p(X)

Q is empty.

The following Q TRS is given: Q restricted rewrite system:
The TRS R consists of the following rules:

a__f(s(0)) → a__f(a__p(s(0)))
a__p(s(X)) → mark(X)
mark(p(X)) → a__p(mark(X))
mark(0) → 0
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(s(X)) → s(mark(X))
a__p(X) → p(X)

Q is empty.
The following rules can be removed by the rule removal processor [15] because they are oriented strictly by a polynomial ordering:

mark(cons(X1, X2)) → cons(mark(X1), X2)
Used ordering:
Polynomial interpretation [25]:

POL(0) = 0   
POL(a__f(x1)) = 2·x1   
POL(a__p(x1)) = x1   
POL(cons(x1, x2)) = 1 + x1 + 2·x2   
POL(mark(x1)) = 2·x1   
POL(p(x1)) = x1   
POL(s(x1)) = 2·x1   




↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
QTRS
                  ↳ RRRPoloQTRSProof

Q restricted rewrite system:
The TRS R consists of the following rules:

a__f(s(0)) → a__f(a__p(s(0)))
a__p(s(X)) → mark(X)
mark(p(X)) → a__p(mark(X))
mark(0) → 0
mark(s(X)) → s(mark(X))
a__p(X) → p(X)

Q is empty.

The following Q TRS is given: Q restricted rewrite system:
The TRS R consists of the following rules:

a__f(s(0)) → a__f(a__p(s(0)))
a__p(s(X)) → mark(X)
mark(p(X)) → a__p(mark(X))
mark(0) → 0
mark(s(X)) → s(mark(X))
a__p(X) → p(X)

Q is empty.
The following rules can be removed by the rule removal processor [15] because they are oriented strictly by a polynomial ordering:

mark(0) → 0
Used ordering:
Polynomial interpretation [25]:

POL(0) = 2   
POL(a__f(x1)) = 2·x1   
POL(a__p(x1)) = x1   
POL(mark(x1)) = 2·x1   
POL(p(x1)) = x1   
POL(s(x1)) = 2·x1   




↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ RRRPoloQTRSProof
QTRS
                      ↳ RRRPoloQTRSProof

Q restricted rewrite system:
The TRS R consists of the following rules:

a__f(s(0)) → a__f(a__p(s(0)))
a__p(s(X)) → mark(X)
mark(p(X)) → a__p(mark(X))
mark(s(X)) → s(mark(X))
a__p(X) → p(X)

Q is empty.

The following Q TRS is given: Q restricted rewrite system:
The TRS R consists of the following rules:

a__f(s(0)) → a__f(a__p(s(0)))
a__p(s(X)) → mark(X)
mark(p(X)) → a__p(mark(X))
mark(s(X)) → s(mark(X))
a__p(X) → p(X)

Q is empty.
The following rules can be removed by the rule removal processor [15] because they are oriented strictly by a polynomial ordering:

a__p(s(X)) → mark(X)
mark(s(X)) → s(mark(X))
Used ordering:
Polynomial interpretation [25]:

POL(0) = 0   
POL(a__f(x1)) = x1   
POL(a__p(x1)) = x1   
POL(mark(x1)) = 2·x1   
POL(p(x1)) = x1   
POL(s(x1)) = 1 + 2·x1   




↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ RRRPoloQTRSProof
                    ↳ QTRS
                      ↳ RRRPoloQTRSProof
QTRS
                          ↳ AAECC Innermost

Q restricted rewrite system:
The TRS R consists of the following rules:

a__f(s(0)) → a__f(a__p(s(0)))
mark(p(X)) → a__p(mark(X))
a__p(X) → p(X)

Q is empty.

We have applied [19,8] to switch to innermost. The TRS R 1 is

mark(p(X)) → a__p(mark(X))
a__p(X) → p(X)

The TRS R 2 is

a__f(s(0)) → a__f(a__p(s(0)))

The signature Sigma is {a__f}

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ RRRPoloQTRSProof
                    ↳ QTRS
                      ↳ RRRPoloQTRSProof
                        ↳ QTRS
                          ↳ AAECC Innermost
QTRS
                              ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

a__f(s(0)) → a__f(a__p(s(0)))
mark(p(X)) → a__p(mark(X))
a__p(X) → p(X)

The set Q consists of the following terms:

a__f(s(0))
mark(p(x0))
a__p(x0)


Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

MARK(p(X)) → A__P(mark(X))
A__F(s(0)) → A__P(s(0))
A__F(s(0)) → A__F(a__p(s(0)))
MARK(p(X)) → MARK(X)

The TRS R consists of the following rules:

a__f(s(0)) → a__f(a__p(s(0)))
mark(p(X)) → a__p(mark(X))
a__p(X) → p(X)

The set Q consists of the following terms:

a__f(s(0))
mark(p(x0))
a__p(x0)

We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ RRRPoloQTRSProof
                    ↳ QTRS
                      ↳ RRRPoloQTRSProof
                        ↳ QTRS
                          ↳ AAECC Innermost
                            ↳ QTRS
                              ↳ DependencyPairsProof
QDP
                                  ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(p(X)) → A__P(mark(X))
A__F(s(0)) → A__P(s(0))
A__F(s(0)) → A__F(a__p(s(0)))
MARK(p(X)) → MARK(X)

The TRS R consists of the following rules:

a__f(s(0)) → a__f(a__p(s(0)))
mark(p(X)) → a__p(mark(X))
a__p(X) → p(X)

The set Q consists of the following terms:

a__f(s(0))
mark(p(x0))
a__p(x0)

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ RRRPoloQTRSProof
                    ↳ QTRS
                      ↳ RRRPoloQTRSProof
                        ↳ QTRS
                          ↳ AAECC Innermost
                            ↳ QTRS
                              ↳ DependencyPairsProof
                                ↳ QDP
                                  ↳ DependencyGraphProof
QDP
                                      ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

MARK(p(X)) → MARK(X)

The TRS R consists of the following rules:

a__f(s(0)) → a__f(a__p(s(0)))
mark(p(X)) → a__p(mark(X))
a__p(X) → p(X)

The set Q consists of the following terms:

a__f(s(0))
mark(p(x0))
a__p(x0)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ RRRPoloQTRSProof
                    ↳ QTRS
                      ↳ RRRPoloQTRSProof
                        ↳ QTRS
                          ↳ AAECC Innermost
                            ↳ QTRS
                              ↳ DependencyPairsProof
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ QDP
                                      ↳ UsableRulesProof
QDP
                                          ↳ QReductionProof

Q DP problem:
The TRS P consists of the following rules:

MARK(p(X)) → MARK(X)

R is empty.
The set Q consists of the following terms:

a__f(s(0))
mark(p(x0))
a__p(x0)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

a__f(s(0))
mark(p(x0))
a__p(x0)



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ RRRPoloQTRSProof
                    ↳ QTRS
                      ↳ RRRPoloQTRSProof
                        ↳ QTRS
                          ↳ AAECC Innermost
                            ↳ QTRS
                              ↳ DependencyPairsProof
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ QDP
                                      ↳ UsableRulesProof
                                        ↳ QDP
                                          ↳ QReductionProof
QDP
                                              ↳ QDPSizeChangeProof

Q DP problem:
The TRS P consists of the following rules:

MARK(p(X)) → MARK(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs: